<template>
	<view>
		<view class="main">
			<image class="image" :src="icon"></image>
			<view class="notice">{{list[now]}}</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			list:{
				type:Array,
				default:[]
			}
		},
		data(){
			return {
				icon:this.myConfig.storageUrl+'/static/noticeIcon.png',
				now:0
			}
		},
		mounted(){
			const that=this;
			setInterval(function(){
				if(that.list.length!=0)
					that.now=(that.now+1)%that.list.length;
			},4000);
		},
	}
</script>

<style scoped>
	.main{
		width: 600rpx;
		position: fixed;
		left: 50%;
		margin-left: -300rpx;
		top: 50%;
		margin-top: -400rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		background-color: #F1F1F1;
		text-align: center;
		border-radius: 30rpx;
		overflow: hidden;
		color: #F0AD4E;
		animation: load 1s linear;
	}
	.image{
		width: 50rpx;
		height: 50rpx;
	}
	.notice{
		width: 550rpx;
		overflow: hidden;
	}
</style>
